#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Autor Jiangjun

# 引入time模块
import time;

ticks = time.time()
print("当前时间戳为{}\n".format(ticks))

# 获取本地时间
localTime = time.localtime(time.time())
print("本地时间是:{}\n".format(localTime))

# 格式化后的时间
localTime1 = time.asctime(time.localtime(time.time()))
print("格式化的时间是:{}\n".format(localTime1))

# 格式化日期
timeFormat = "%Y-%m-%d %H:%M:%S";
print("格式化后的日期是:{}\n".format(time.strftime(timeFormat,time.localtime())))

